﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace RotaractProjectCalendar.Models
{
    public class City
    {
        public int Id { get; set; }
        
        [Display(Name = "Nazwa miasta")]
        [Required(ErrorMessage = "City name is required!")]
        [DataType(DataType.Text)]
        [MaxWords(2)]
        [StringLength(20, ErrorMessage = "City name cannnot be longer than 20 characters.")]
        public string CityName { get; set; }

        public virtual ICollection<Project> Projects { get; set; }
    }
}